package homework;

import org.junit.Test;

public class inter {
    interface Soo{
        int a=1;

        static void staticMehtod() {
        }

        int add(int x,int y);

        public static void staticMetod(){
            System.out.println("show()");
        }
        default double sub(double x, double y){
            return x-y;
        }
        private void show(){
            System.out.println("private修饰的私有的方法");
        }


    }
    static class SooImpl implements Soo{
        @Override
        public int add(int x,int y){
            return x+y;
        }
    }
   @Test
    public void test(){
        Soo soo=new SooImpl();
        System.out.println(soo.add(1,2));
        System.out.println(soo.sub(1.0,2.0));
        Soo.staticMehtod();
        System.out.println(Soo.a);
    }


}

